@import "./playerColors.less";
@progress-height: 10px;
@progress-radius: (@progress-height / 2);
@player-height: 110px;
.player-shadow() {
  box-shadow: 0px 0px 20px  rgba(0, 0, 0, 0.4);
}
.player{
  position: fixed;
  display: flex;
  justify-content: center;
  bottom: 0;
  left: 0;
  width: 100%;
  height: @player-height;
  box-sizing: border-box;
  padding: 10px 20px 5px 20px;
  background-color: @player-bg-color;
  transition: all ease-in-out 0.5s;
  transform: translate(0%, 95%);
  .player-shadow();
  user-select: none;
  z-index: 10;
  &>div {
    flex: 1;
  }
  .lock {
    @lock-size: 20px;
    @span: 10px;

    position: absolute;
    display: flex;
    justify-content: center;
    align-items: center;
    top: -@lock-size - @span;
    font-size: @lock-size;
    color: @player-font-color;
    background-color: @player-bg-color;
    padding: @span;
    border-radius: ((@lock-size + @span) / 5);
    cursor: pointer;
    z-index: 10;
    .player-shadow();
    &:hover {
      color: @btn-hover-color;
    }
  }
  .music-info {
    position: relative;
    overflow: hidden;
    
    &-hidden {
      visibility: hidden;
    }
    .infoControl {
      position: absolute;
      top: -@player-height;
      height: 100%;
      transition: all .5s ease-in-out;
      &-change {
        top: 0;
      }
      .fullScreen {
        height: @player-height;
        color: #fff;
        .down-icon {
          display: flex;
          justify-content: center;
          align-items: center;
          height: 100%;
          font-size: 30px;
          width: 60px;
          color: @player-font-color;
          cursor: pointer;
        }
      }
      .normal {
        display: flex;
        align-items: center;
        height: @player-height;
        .mask {
          @mask-size: 64px;
          position: relative;
          height: @mask-size;
          width: @mask-size;
          border-radius: 5%;
          overflow: hidden;
          border: solid 2px #fff;
          &-hover {
            &:hover {
              .expend {
                visibility: visible;
              }
            }
          }
          .expend {
            visibility: hidden;
            position: absolute;
            top: 0;
            left: 0;
            z-index: 5;
            font-size: 50px;
            height: @mask-size;
            width: @mask-size;
            color: #fff;
            cursor: pointer;
            .blur-layer {
              position: absolute;
              top: 0;
              left: 0;
              height: 100%;
              width: 100%;
              z-index: 1;
              background-color: rgba(0, 0, 0, 0.6);
              filter: blur(5px);
            }
            .content {
              display: flex;
              justify-content: center;
              align-items: center;
              position: absolute;
              top: 0;
              left: 0;
              height: 100%;
              width: 100%;
              z-index: 2;
              transition: all .3s ease-in-out;
            }
          }
          .loading {
            position: absolute;
            top: 0;
            left: 0;
            display: flex;
            z-index: 5;
            justify-content: center;
            align-items: center;
            font-size: 50px;
            height: @mask-size;
            width: @mask-size;
            color: @player-font-color;
            background-color: rgba(46, 46, 46, 0.3);
          }
          .placeholder {
            display: flex;
            justify-content: center;
            align-items: center;
            height: @mask-size;
            width: @mask-size;
            color: @player-font-color;
            background-color: rgba(46, 46, 46, 0.3);
            font-size: 50px;
          }
          img {
            width: 100%;
            height: 100%;
          }
        }
        .text {
          display: flex;
          height: 100%;
          flex-direction: column;
          justify-content: center;
          width: 200px;
          margin-left: 10px;
          overflow: hidden;
          white-space:nowrap;
          text-overflow:ellipsis;
          .music-name {
            color: @player-font-color;
            font-size: 24px;
          }
          .singer {
            color: @player-font-color;
          }
        }
      }
    }
  }
  .controller {
    display: flex;
    flex-direction: column;
    // background-color: rgb(92, 92, 92);
    .control {
      display: flex;
      justify-content: center;
      align-items: center;
      flex: 1;
      .control-btn(@font-size: 30px) {
        font-size: @font-size;
        color: @player-font-color;
        cursor: pointer;
        margin: 0 10px;
        &:hover {
          color: @btn-hover-color
        }
      }
      .prev-btn {
        .control-btn();
      }
      .play-btn {
        .control-btn(40px);
      }
      .next-btn {
        .control-btn();
      }
    }
    .progress {
      display: flex;
      align-items: center;
      flex: 1;
      color: @player-font-color;
      cursor: pointer;

      .progress-full {
        @progress-full-padding: 20px;

        width: 100%;
        height: @progress-height;
        border-radius: @progress-radius;
        background-color: rgba(126, 126, 126, 0.7);
        margin: 0 @progress-full-padding;
        // overflow: hidden;
        &:hover {
          transform: scaleY(1.2);
          .progress-step {
            background-color: darken(@btn-hover-color, 10%);
            .dot {
              transform: scaleX(1.6) scaleY(1.5);
              visibility: visible;
            }
          }
        }
        .current-time {
        }
        .total-time {
        }
        .progress-step {
          position: relative;
          height: @progress-height;
          border-radius: @progress-radius;
          background-color: @btn-hover-color;
          .dot {
            @dot-size: 10px;
            position: absolute;
            top: 0;
            right: -(@progress-full-padding - @dot-size);
            height: @dot-size;
            width: @dot-size;
            border-radius: 50%;
            background-color: lighten(@btn-hover-color, 10%);
            visibility: hidden;
          }
        }
      }
    }
  }
  .other-operator {
    display: flex;
    justify-content: center;
    align-items: center;
    .op-btn {
      display: flex;
      justify-content: center;
      align-items: center;
      font-size: 25px;
      color: @player-font-color;
      cursor: pointer;
      margin-right: 20px;
      .icon {
        position: relative;
        top: 0;
        left: 0;
      }
    }
    .iconContainer() {
      position: relative;
      display: flex;
      justify-content: center;
      align-items: center;
      top: 0;
      left: 0;
      padding: 10px;
      height: 50px;
      width: 50px;
      border-radius: 50%;
      background-color: rgba(0, 0, 0, 0.2);
      &:hover {
        background-color: rgba(0, 0, 0, 0.5);
      }
    }
    .sound {
      position: relative;
      top: 0;
      left: 0;
      .sound-icon-container {
        .iconContainer();
        .sound-icon {
          font-size: 30px;
          transform: rotate(90deg);
        }
        .mute {
          position: absolute;
          top: 15px;
          left: 20px;
          z-index: 10;
          visibility: hidden;
          font-size: 20px;
          transform: rotate(45deg) scale(2);
        }
      }
      &:hover {
        .buffer-area {
          visibility: visible;
        }
      }
      .buffer-area {
        @bar-height: 150px;
        @bar-width: 30px;
        position: absolute;
        height: @bar-height + 20px;
        width: @bar-width;
        top: -@bar-height;
        left: 10px;
        visibility: hidden;
        z-index: 10;
        .volume-bar {
          display: flex;
          justify-content: center;
          align-items: center;
          position: absolute;
          height: @bar-height;
          width: @bar-width;
          top: -10px;
          left: 0;
          background-color: rgba(0, 0, 0, 0.3);
          box-shadow: 0 0 15px rgba(0, 0, 0, 0.4);
          border-radius: 15px;
          padding: 15px 0;
          .bar-outer {
            @outer-width: @bar-width * 0.4;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            height: 100%;
            width: @outer-width;
            background-color: #fff;
            border-radius: 15px;
            .bar-inner {
              width: @outer-width;
              background-color: #66CC66;
              border-radius: 0 0 15px 15px;
            }
            .dot {
              @dot-size: @outer-width;
              width: @dot-size;
              height: @dot-size;
              border-radius: 50%;
              transform: scale(1.5);
              background-color: @player-bg-color;
              box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
              flex-shrink: 0;
              &:hover {
                background-color: lighten(@player-bg-color, 10%);
              }
            }
          }
        }
      }
    }

    .play-list {
      position: relative;
      top: 0;
      left: 0;
      .iconContainer {
        .iconContainer()
      }
    }
  }
}

.player-disable {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

// 播放列表
.playlist-container {
  @playlist-height: 600px;
//   @playlist-height: 800px;
  @playlist-width: 400px;
  position: absolute;
  right: -@playlist-width;
  bottom: @player-height;
  width: @playlist-width;
  height: @playlist-height;
  overflow: hidden;
  z-index: 9;
  background-color: @play-list-bg-color;
  transition: all 0.3s ease-in-out;
  box-shadow: -10px -15px 20px -15px rgba(0, 0, 0, 0.4);
  &-show {
    right: 0;
  }
}
.playlist-item-container-class {
  color: rgba(0, 0, 0, 0.6);
  &:nth-of-type(2n+1) {
    background-color: darken(@play-list-bg-color, 10%);
  }
}
.playlist-item-class {
  &:hover {
    color: @btn-hover-color;
  }
}
.indicator-class {
  color:  @btn-hover-color;
}
.top-bar-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  padding: 0px 20px;
  background-color: @play-list-bg-color;
  border-bottom: solid 1px #fff;
  &>div:nth-of-type(1) {
      font-size: 20px;
      color: rgba(0, 0, 0, 0.8);
      font-weight: bold;
      text-align: left;
  }
  &>div:nth-of-type(2) {
      display: flex;
      justify-content: space-between;
      align-items: center;
      .total {
          color: rgba(0, 0, 0, 0.5);
      }
      .clear {
          color: @btn-hover-color;
          cursor: pointer;
      }
  }
}


// 详情
.detail-layer {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 100vh;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #CBCBCB;
  transition: all .3s ease-in-out;
  &-show {
    top: 0;
  }
  .top-bar {
    position: relative;
    z-index: 6;

    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 20px;
    color: #fff;
    &>div {
      display: flex;
      align-items: center;
      flex: 1;
      .down-icon {
        font-size: 30px;
        cursor: pointer;
      }
      .music-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        &>div:nth-of-type(1) {
          font-weight: bold;
          transform: scale(2);
        }
        &>div:nth-of-type(2) {
          transform: translateY(5px);
        }
      }
    }
  }
  .content {
    position: relative;
    z-index: 6;

    display: flex;
    justify-content: center;
    flex: 1;
    width: 100%;
    padding-bottom: @player-height;
    // 歌词
    .lrc-container {
      height: 100%;
      flex: 1;
      .lyric {
        // background-color: #fff;
        color: #fff;
      }
    }
    // 可视化
    .visualization-container {
      flex: 1;
      .visualization {
        
      }
    }
    .other {
      flex: 1;
    }
  }
  .blur-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    &>div {
      width: 100%;
      height: 100%;
      background-size: cover;
      background-repeat: no-repeat;
      background-position: center center;
      filter: blur(10px);
      background-blend-mode: darken;
      transition: all 0.5s ease-in-out;
    }
  }
}

.audio {
  position: fixed;
  z-index: -9;
  visibility: hidden;
}